﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepartmentManage.aspx.cs" Inherits="Shop.WebApp.SysBase.DepartmentManage" %>
<%@ Register Assembly="Alpha.WebCustomControl" Namespace="DoNet.Common.WebCustomControl"   TagPrefix="alpha" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
        <tr>
            <td>
                <asp:LinkButton ID="lkbCreate" runat="server" onclick="lkbCreate_Click" CausesValidation="false">新增部门</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td>
                <table runat="server" id="OperateArea">
                    <tr>
                        <td>代码</td>
                        <td>
                            <alpha:WebTextBox ID="Code" runat="server" AllowEmpty="False" MaxLength="15" 
                                ValidType="String"><Value></Value>
                            </alpha:WebTextBox>
                        </td>
                        <td>名称</td>
                        <td>
                            <alpha:WebTextBox ID="Name" runat="server" AllowEmpty="False" MaxLength="20"><Value>
                            </Value>
                            </alpha:WebTextBox>
                        </td>
                         <td></td>
                    </tr>
                    
                      <tr>
                        <td>部门主管</td>
                        <td>
                            <alpha:WebTextBox ID="Manager" runat="server" AllowEmpty="False" MaxLength="15" 
                                ValidType="String"><Value></Value>
                            </alpha:WebTextBox>
                        </td>
                        <td>序号</td>
                        <td>
                            <asp:TextBox runat="server" ID="Sequence" MaxLength="3"></asp:TextBox>
                        </td>
                         <td></td>
                    </tr>
                    
                   <tr>
                        <td>状态</td>
                        <td>
                            <alpha:WebRadioButtonList runat="server" ID="State" RepeatDirection="Horizontal">
                                <asp:ListItem Enabled="true" Value="normal">正常</asp:ListItem>
                                <asp:ListItem Value="valid">无效</asp:ListItem>
                            </alpha:WebRadioButtonList>
                        </td>
                        <td>&nbsp;</td>
                        <td>
                            <alpha:WebButton ID="btnSave" runat="server"  Text="新增" 
                                onclick="btnSave_Click"/>
                            <alpha:WebButton ID="btnUpadate" runat="server" Text="更新" 
                                onclick="btnUpadate_Click"  Visible="false"/>
                        </td>
                        <td>
                            &nbsp;</td>

                    </tr>
                    
                    <tr  style="display:none"> 
                         <td>代码</td>
                        <td>
                            <alpha:WebTextBox ID="txtCode" runat="server" MaxLength="15" >
                            </alpha:WebTextBox>
                        </td>
                        <td>名称</td>
                        <td>
                            <alpha:WebTextBox ID="txtName" runat="server" MaxLength="20"></alpha:WebTextBox>
                        </td>                   
                        <td>
                            <alpha:WebButton ID="btnSearch" runat="server" Text="搜索" 
                                onclick="btnSearch_Click" CausesValidation="False"/>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        
        <tr>
            <td>
                <asp:GridView runat="server" ID="gvList" AutoGenerateColumns="False" 
                    DataKeyNames="Code" onrowdeleting="gvList_RowDeleting" 
                    onselectedindexchanging="gvList_SelectedIndexChanging">
                    <Columns>
                        <asp:BoundField DataField="Code" HeaderText="代码" />
                        <asp:BoundField DataField="Name" HeaderText="名称" />
                        <asp:CommandField DeleteText="×" HeaderText="删除" ShowDeleteButton="True" ItemStyle-HorizontalAlign="Center">
                        </asp:CommandField>
                        <asp:CommandField HeaderText="更新" SelectText="√" ShowSelectButton="True" ItemStyle-HorizontalAlign="Center">
                        </asp:CommandField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
             <asp:Panel  runat="server" ID="pnPage"></asp:Panel>
            </td>
        </tr>
    </table>    
    </div>
    </form>
</body>
</html>
